/* 
* This module is part of the Entertainment Network system 
* Copyright (c) SCC Soft Computer, Inc. 2018 
* All Rights Reserved 
* 
* This document contains unpublished, confidential and proprietary 
* information of SCC Soft Computer, Inc. No disclosure or use of 
* any portion of the contents of these materials may be made without the 
* express written consent of Soft Computer Consultants, Inc. 
* 
*/ 

package isd.dp.ua.EntertainmentNetworkServer.Models;
// Generated Mar 14, 2018 11:11:06 AM by Hibernate Tools 3.6.0.Final

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;

import isd.dp.ua.EntertainmentNetworkServer.Common.BaseModel;

/**
 * Show generated by hbm2java
 */
@SuppressWarnings("serial")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType
@Entity
@Table(name = "SHOW", schema = "PBAB")
public class Show extends BaseModel implements java.io.Serializable 
{
	public Show()
	{
	}

	public Show(BigDecimal shwId, String shwName)
	{
		this.shwId = shwId;
		this.shwName = shwName;
	}

	public Show(BigDecimal shwId, String shwName, String shwDescr, byte[] shwIcon, Set<Scheduler> schedulers) 
	{
		this.shwId = shwId;
		this.shwName = shwName;
		this.shwDescr = shwDescr;
		this.shwIcon = shwIcon;
		this.schedulers = schedulers;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SHW_SEQ")
    @SequenceGenerator(name = "SHW_SEQ", sequenceName = "SHW_SEQ")
	@Column(name = "SHW_ID", unique = true, nullable = false, precision = 22, scale = 0)
	public BigDecimal getShwId() 
	{
		return this.shwId;
	}

	public void setShwId(BigDecimal shwId)
	{
		this.shwId = shwId;
	}

	@Column(name = "SHW_NAME", nullable = false, length = 100)
	public String getShwName() 
	{
		return this.shwName;
	}

	public void setShwName(String shwName) 
	{
		this.shwName = shwName;
	}

	@Column(name = "SHW_DESCR")
	public String getShwDescr() 
	{
		return this.shwDescr;
	}

	public void setShwDescr(String shwDescr) 
	{
		this.shwDescr = shwDescr;
	}
	
	@Column(name = "SHW_PERFORMER")
	public String getShwPerformer() 
	{
		return this.shwPerformer;
	}

	public void setShwPerformer(String shwPerformer) 
	{
		this.shwPerformer = shwPerformer;
	}

	@Column(name = "SHW_ICON")
	public byte[] getShwIcon()
	{
		return this.shwIcon;
	}

	public void setShwIcon(byte[] shwIcon) 
	{
		this.shwIcon = shwIcon;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "show")
	public Set<Scheduler> getSchedulers() 
	{
		return this.schedulers;
	}

	public void setSchedulers(Set<Scheduler> schedulers) 
	{
		this.schedulers = schedulers;
	}
	
	@Override
	public String toString()
	{
		return "Show [showId=" + this.getShwId() + "]";
	}
	
	private BigDecimal shwId;
	private String shwName;
	private String shwPerformer;
	private String shwDescr;
	private byte[] shwIcon;
	@XmlTransient
	private Set<Scheduler> schedulers = new HashSet<Scheduler>(0);
}
